load("//bazel:mongo_src_rules.bzl", "idl_generator", "mongo_cc_library", "mongo_cc_unit_test")

package(default_visibility = ["//visibility:public"])

exports_files(
    glob([
        "*.h",
        "*.cpp",
    ]),
)

mongo_cc_library(
    name = "server_status_core",
    srcs = [
        "server_status.cpp",
    ],
    deps = [
        "//src/mongo/db:profile_settings",
        "//src/mongo/db/extension/host:extension_operation_metrics_registry",
        "//src/mongo/db/query/algebra",
        "//src/mongo/db/sorter:sorter_base",
        "//src/mongo/db/storage:container",
        "//src/mongo/db/storage/key_string",
    ],
)

mongo_cc_library(
    name = "server_status_metric",
    srcs = [
        "server_status_metric.cpp",
    ],
    deps = [
        "//src/mongo/db:server_base",
    ],
)

mongo_cc_library(
    name = "server_status_servers",
    srcs = [
        "server_status_security_servers.cpp",
        "server_status_servers.cpp",
    ],
    deps = [
        ":server_status_core",
        "//src/mongo/db/admission:ingress_request_rate_limiter",
        "//src/mongo/db/stats:counters",
        "//src/mongo/transport:message_compressor",
        "//src/mongo/transport:service_executor",
        "//src/mongo/util/net:ssl_manager",
    ],
)

mongo_cc_library(
    name = "histogram_server_status_metric",
    hdrs = [
        "histogram_server_status_metric.h",
        "//src/mongo/util:histogram.h",
    ],
    deps = [
        "//src/mongo/db/commands/server_status:server_status_metric",
    ],
)

mongo_cc_unit_test(
    name = "histogram_server_status_metric_test",
    srcs = [
        "histogram_server_status_metric_test.cpp",
    ],
    tags = ["mongo_unittest_sixth_group"],
    deps = [
        ":histogram_server_status_metric",
    ],
)
